package com.client.clovece;
import java.util.ArrayList;

import javax.swing.ImageIcon;
import javax.swing.JLabel;


public class MyLabel extends JLabel{
	private ArrayList <ImageIcon>imgs;
	
	public MyLabel(){
		imgs = new ArrayList<ImageIcon>();
		updateUI();
		setAlignmentX(LEFT_ALIGNMENT);
	}
	
	public MyLabel(ArrayList<String> paths){
		imgs = new ArrayList<ImageIcon>();
		
		for(int i=0; i<paths.size(); i++){
			System.out.println(i+"Ahoj \n");
			imgs.add(new ImageIcon(paths.get(i)));
		}
		
		updateUI();
		setAlignmentX(LEFT_ALIGNMENT);
	}
	
	public void addImg(String path){
		imgs.add(new ImageIcon(path));
	}
	
	public ImageIcon getImg(int i){
		return imgs.get(i);
	}
	
	public void setIconFromList(int i){
		setIcon(imgs.get(i));
	}
	
}
